/*
** flags_base.c for flag_base in /home/chassa_m/rendu/PSU_2013_my_printf
** 
** Made by chassa_m
** Login   <chassa_m@epitech.net>
** 
** Started on  Fri Nov 15 15:27:41 2013 chassa_m
** Last update Thu Nov 28 22:16:14 2013 chassa_m
*/

#include <stdarg.h>

int     flag_p(va_list ap)
{
  void	*format;

  format = va_arg(ap, void *);
  my_putstr("0x");
  my_putnbr_base(format, "0123456789abcdef");
}

int     flag_X(va_list ap)
{
  my_putnbr_base(va_arg(ap, unsigned int), "0123456789ABCDEF");
}

int     flag_x(va_list ap)
{
  my_putnbr_base(va_arg(ap, unsigned int), "0123456789abcdef");
}

int     flag_b(va_list ap)
{
  my_putnbr_base(va_arg(ap, unsigned int), "01");
}

int     flag_o(va_list ap)
{
  my_putnbr_base(va_arg(ap, unsigned int), "01234567");
}
